<?
$this->placeholder('page_title')->set('Reload MusicBrainz Data');
?>

<?
switch ($this->type):
	case 'artist':
?>
<h3>Artists Updated</h3>
<p>
<? if( $this->artists): ?>
<? foreach ($this->artists as $artist): ?>
<?= $artist->name ?>, 
<? endforeach; ?>
<? else: ?>
	<?= new Zupal_Control_IconLink(
	'http://wiki.musicbrainz.org/-/skins/musicbrainzcommon/musicbrainz_logo.png',
	'Reload Artists',
		array(
			'module' => 'media',
			'controller' => 'musicbrainz',
			'action' => 'reload',
			'type' => 'artist',
			'beginswith' => 'aaa'
		)
	) ?>
<? endif; ?>
</p>
<? if (!$this->stop_reload): ?>
<script language="javascript">
	function reload_page()
	{
		document.location="/media/musicbrainz/reload/type/artist/beginswith/<?= $this->beginswith + 1 ?>";
	}
	
	window.onload=reload_page;
</script>	
<? endif; ?>

<?
	break;


endswitch;
?>